Computer programs execute on computers that typically include a processor and memory, such as random access memory. Physical memory is often managed by a computer's operating system to create a virtual memory space. It is this virtual memory space that is accessed by application programs to store and later read information. Memory is organized into locations, each having a unique address.
Typically, an application program can call an operating system procedure to allocate memory for use by the program. An example of such a command is the malloc command in the C programming language. When the memory is no longer required, the program can call an operating system procedure to free the memory so that it can be re-used by the program. Other types of memory that can automatically be allocated by the operating system on behalf of an application program can be stack and heap memory, for example.